import unittest
import HTMLTestRunner
import os
import time


report_filename = time.strftime('%Y%m%d%H%M%S')+'-report.hrml'
report_path = f'D/report/{report_filename}'
loader = unittest.defaultTestLoader.discover('../5.18','*demo*')
with open(report_path, 'wb') as f:
     runner = HTMLTestRunner.HTMLTestRunner(
         title='⾃动化测试报告',
         description='⾃动化测试报告描述',
         stream=f,
         verbosity=2
     )
runner.run(loader)